home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / packet / terminal / top_152 / src152.exe / rar / TOPCHR.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-16  |  21KB  |  704 lines

  1. {┌─────────────────────────────────────────────────────────────────────────┐}
  2. {│                                                                         │}
  3. {│                              T. O. P.                                   │}
  4. {│                                                                         │}
  5. {│                        (T)he  (O)ther  (P)acket                         │}
  6. {│                                                                         │}
  7. {│ T O P C H R . P A S                                                     │}
  8. {│                                                                         │}
  9. {│                                                                         │}
  10. {│                                                                         │}
  11. {│ Routinen für den Vorschreib-Bildschirm                                  │}
  12. {│                                                                         │}
  13. {│                                                                         │}
  14. {└─────────────────────────────────────────────────────────────────────────┘}
  15.  
  16.  
  17. Procedure Chr_Darstell (* Kanal : Byte; KC : Sondertaste; VC : char *);
  18. Begin
  19.   if K[Kanal]^.Cmd then Chr_Cmd_Show(Kanal,KC,VC)
  20.                    else Chr_Vor_Show(Kanal,KC,VC);
  21. End;
  22.  
  23.  
  24. Procedure Chr_Cmd_Show (* Kanal : Byte; KC : Sondertaste; VC : char *);
  25. Var  i,i1,
  26.      XLV,XH,
  27.      VAnz     : Byte;
  28.      Neben,
  29.      NeuPage  : Boolean;
  30. Begin
  31.   with K[Kanal]^ do
  32.   Begin
  33.     if Vor_im_EMS then EMS_Seite_einblenden(Kanal,Vor);
  34.  
  35.     NeuPage := true;
  36.  
  37.     VAnz := VEnd - VBeg + 1;
  38.     if VAnz > VorCmdZeilen then VAnz := VorCmdZeilen;
  39.  
  40.     XLV := length(VorWrite[Kanal]^[stC]);
  41.  
  42.     Case KC of
  43.  _Andere : case VC of
  44.              #1..#7,#11,#12, #14..#19, #21..#24, #26..#31, #32..#254
  45.               : if XLV < 79 then
  46.                 begin
  47.                   NeuPage := false;
  48.                   if Gross then VC := UpCase(VC);
  49.                   if not insert_ON then delete(VorWrite[Kanal]^[stC],X1C,1);
  50.                   insert(VC,VorWrite[Kanal]^[stC],X1C);
  51.                   inc(X1C);
  52.                 end else Alarm;
  53.  
  54.            ^J : Alarm;
  55.  
  56.            ^T : if X1C <= XLV then
  57.                 begin
  58.                   Del_Wort(VorWrite[Kanal]^[stC],X1C);
  59.                   NeuPage := false;
  60.                 end else Alarm;
  61.  
  62.            ^Y : begin
  63.                   VorWrite[Kanal]^[stC] := CvCh;
  64.                   X1C := 3;
  65.                 end;
  66.  
  67.            #255: ;
  68.            end;
  69.  
  70.     _Ret : begin
  71.              Auswert_CMD(Kanal,VorWrite[Kanal]^[stC]);
  72.              Vor_Feld_Scroll(Kanal);
  73.              Cmd := false;
  74.            end;
  75.  
  76.    _Back : begin
  77.              NeuPage := false;
  78.              if X1C > 3 then
  79.              begin
  80.                delete(VorWrite[Kanal]^[stC],X1C-1,1);
  81.                dec(X1C);
  82.              end else Alarm;
  83.            end;
  84.  
  85.    _AltK : Gross := not Gross;
  86.  
  87.    _AltY : begin                 (* ALT-Y *)
  88.              for i := stC to (VorZeilen - 1) do
  89.                  VorWrite[Kanal]^[i] := VorWrite[Kanal]^[i+1];
  90.              VorWrite[Kanal]^[VorZeilen] := CvCh;
  91.              X1C := 3;
  92.            end;
  93.  
  94.     _Del : if (XLV > 0) and (X1C <= XLV) then  (* DEL *)
  95.            begin
  96.              delete(VorWrite[Kanal]^[stC],X1C,1);
  97.              NeuPage := false;
  98.            end else Alarm;
  99.  
  100.      _Up : begin    (* Cursor Up *)
  101.              dec(stC); dec(Y1C);
  102.              if Y1C < 1 then Y1C := 1;
  103.              if stC < ((VorZeilen - VorCmdZeilen) + 1) then
  104.              begin
  105.                stC := (VorZeilen - VorCmdZeilen) + 1;
  106.                Alarm;
  107.              end;
  108.              if length(VorWrite[Kanal]^[stC]) < X1C then X1C := length(VorWrite[Kanal]^[stC]) + 1;
  109.            end;
  110.  
  111.      _Dn : begin    (* Cursor Dn *)
  112.              inc(Y1C); inc(stC);
  113.              if Y1C > VAnz then Y1C := VAnz;
  114.              if stC > VorZeilen then
  115.              begin
  116.                stC := VorZeilen;
  117.                if VorWrite[Kanal]^[stC] <> CvCh then Vor_Feld_Scroll(Kanal)
  118.                                                 else Alarm;
  119.              end;
  120.              if length(VorWrite[Kanal]^[stC]) < X1C then
  121.                 X1C := length(VorWrite[Kanal]^[stC]) + 1;
  122.            end;
  123.  
  124.    _Left : begin  (* Cursor left *)
  125.              if X1C > 3 then dec(X1C) else Alarm;
  126.              NeuPage := false;
  127.            end;
  128.  
  129.   _Right : begin   (* Cursor right *)
  130.              if X1C <= XLV then inc(X1C) else Alarm;
  131.              NeuPage := false;
  132.            end;
  133.  
  134.    _Home : begin         (* Home *)
  135.              X1C := 3;
  136.              NeuPage := false;
  137.            end;
  138.  
  139.     _Ins : begin         (* Ins *)
  140.              Insert_ON := not Insert_ON;
  141.              NeuPage := false;
  142.            end;
  143.  
  144.     _End : begin         (* END *)
  145.              X1C := XLV + 1;
  146.              NeuPage := false;
  147.            end;
  148.  
  149. _CtrlLeft,
  150. _CtrlRight:begin
  151.              Cur_Wort(VorWrite[Kanal]^[stC],KC,X1C,3);
  152.              NeuPage := false;
  153.            end;
  154.  
  155. _CtrlPgUp: begin   (* Ctrl-Page-Up *)
  156.              stC := (VorZeilen - VorCmdZeilen) + 1;
  157.              X1C := 3; Y1C := 1;
  158.            end;
  159.  
  160. _CtrlPgDn: begin    (* Ctrl-Page-Dn *)
  161.              i := VorZeilen;
  162.              While (copy(VorWrite[Kanal]^[i],3,77) = '') and
  163.                    (i > VorZeilen-VorCmdZeilen+1) do dec(i);
  164.              stC := i;
  165.              if i < VorZeilen - VorCmdZeilen + VAnz
  166.               then Y1C := i - (VorZeilen - VorCmdZeilen)
  167.               else Y1C := VAnz;
  168.              X1C := length(VorWrite[Kanal]^[stC]) + 1;
  169.            end;
  170.  
  171.     _Esc : Cmd := false;
  172.  
  173.     _Nix :;
  174.  
  175.       else Alarm;
  176.  
  177.     end; {case KC of}
  178.  
  179.     if show = Kanal then if NeuPage
  180.      then Neu_BildVor(Kanal)
  181.      else WritePage(Kanal,1,Y1C+Vofs,Attrib[23],0,VorWrite[Kanal]^[stC] + G^.Leer);
  182.  
  183.     Soft_Cursor(Kanal);
  184.  
  185.   end; {with Kanal}
  186. End;
  187.  
  188.  
  189. Procedure Chr_Vor_Show (* Kanal : Byte; KC : Sondertaste; VC : char *);
  190. var  i,i1,XH,
  191.      XLV,VAnz    : Byte;
  192.      Hstr        : String[80];
  193.      Flag,
  194.      Umbruch,
  195.      Neben,
  196.      NeuPage     : Boolean;
  197. Begin
  198.   with K[Kanal]^ do
  199.   Begin
  200.     if Vor_im_EMS then EMS_Seite_einblenden(Kanal,Vor);
  201.  
  202.     Hstr := '';
  203.     Umbruch := false;
  204.     NeuPage := true;
  205.     VAnz := VEnd - VBeg + 1;
  206.  
  207.     XLV := length(VorWrite[Kanal]^[stV]);
  208.  
  209.     Case KC of
  210.  
  211. _Andere : Begin
  212.             if (VC in [#1..#7,#11,#12, #14..#19, #21..#24, #26..#31, #32..#254])
  213.                or AltQFlag then
  214.             begin
  215.               if not((XLV >= 79) and (X1V < 79)) then
  216.               begin
  217.                 NeuPage := false;
  218.                 if ((TxByte + length(VorWrite[Kanal]^[stV])) > 254) then
  219.                 begin
  220.                   Tx_Out(Kanal,false);
  221.                   NeuPage := true;
  222.                 end;
  223.  
  224.                 if not insert_ON then delete(VorWrite[Kanal]^[stV],X1V,1);
  225.                 insert(VC,VorWrite[Kanal]^[stV],X1V);
  226.                 inc(X1V);
  227.  
  228.                 if (X1V > 79) then
  229.                 begin
  230.                   i := 1;
  231.                   i1 := 79;
  232.                   While (not(VorWrite[Kanal]^[stV][i1] in UmMenge)) and (i1 > 0) and (i < 79) do
  233.                   begin
  234.                     inc(i);
  235.                     dec(i1);
  236.                   end;
  237.                   if (i > 1) and (i1 > 1) then
  238.                   begin
  239.                     Hstr := copy(VorWrite[Kanal]^[stV],i1+1,i-1);
  240.                     delete(VorWrite[Kanal]^[stV],i1+1,i-1);
  241.                     Umbruch := true;
  242.                   end;
  243.                   KillEndBlanks(VorWrite[Kanal]^[stV]);
  244.                   Set_st_Szeile(Kanal,0,stV);
  245.                   Vor_Feld_Scroll(Kanal);
  246.                   if VorWrite[Kanal]^[stV] > '' then Vor_Dn_Scroll(Kanal);
  247.                   if Umbruch then VorWrite[Kanal]^[stV] := Hstr
  248.                              else VorWrite[Kanal]^[stV] := '';
  249.                   X1V := length(VorWrite[Kanal]^[stV]) + 1;
  250.                   NeuPage := true;
  251.                 end;
  252.               end else Alarm;
  253.             end;
  254.  
  255.             if AltQFlag then VC := #255;
  256.             AltQFlag := false;
  257.  
  258.             case VC of
  259.               ^J : begin
  260.                      KillEndBlanks(VorWrite[Kanal]^[stV]);
  261.                      if X1V > XLV then
  262.                      begin
  263.                        if (TxByte + XLV) > 254 then TX_Out(Kanal,false);
  264.                        Set_st_Szeile(Kanal,0,stV);
  265.                        Vor_Feld_Scroll(Kanal);
  266.                        X1V := length(VorWrite[Kanal]^[stV]) + 1;
  267.                      end else
  268.                      begin
  269.                        Hstr := copy(VorWrite[Kanal]^[stV],X1V,(XLV-X1V)+1);
  270.                        delete(VorWrite[Kanal]^[stV],X1V,(XLV-X1V)+1);
  271.                        Set_st_Szeile(Kanal,0,stV);
  272.                        Vor_Feld_Scroll(Kanal);
  273.                        if VorWrite[Kanal]^[stV] > '' then Vor_Dn_Scroll(Kanal);
  274.                        VorWrite[Kanal]^[stV] := Hstr;
  275.                        X1V := length(VorWrite[Kanal]^[stV]) + 1;
  276.                      end;
  277.                    end;
  278.  
  279.               ^T : if X1V <= XLV then
  280.                    begin
  281.                      Del_Wort(VorWrite[Kanal]^[stV],X1V);
  282.                      NeuPage := false;
  283.                    end else Alarm;
  284.  
  285.               ^Y : begin
  286.                      VorWrite[Kanal]^[stV] := '';
  287.                      X1V := 1;
  288.                    end;
  289.  
  290.               #255: ;
  291.             end;
  292.           End;
  293.  
  294.  
  295.     _Ret : if not FileSend then
  296.            begin
  297.              KillEndBlanks(VorWrite[Kanal]^[stV]);
  298.              if (TxByte + length(VorWrite[Kanal]^[stV])) > 254
  299.               then Tx_Out(Kanal,false);
  300.              Set_st_Szeile(Kanal,0,stV);
  301.              Tx_Out(Kanal,true);
  302.              Set_st_Szeile(Kanal,1,1);
  303.              Vor_Feld_Scroll(Kanal);
  304.            end else InfoOut(Kanal,1,1,InfoZeile(25));
  305.  
  306.    _Back : begin
  307.              NeuPage := false;
  308.              if X1V > 1 then
  309.              begin
  310.                delete(VorWrite[Kanal]^[stV],X1V-1,1);
  311.                dec(X1V);
  312.              end else Alarm;
  313.            end;
  314.  
  315.    _Alt7 : begin
  316.              Set_st_Szeile(Kanal,1,1);
  317.              Vor_Feld_Scroll(Kanal);
  318.              VorWrite[Kanal]^[stV] := '';
  319.              X1V := 1;
  320.            end;
  321.  
  322.    _Alt8 : begin
  323.              Set_st_Szeile(Kanal,1,1);
  324.            end;
  325.  
  326.    _Alt9 : begin
  327.              Tx_Out(Kanal,false);
  328.              NeuPage := true;
  329.            end;
  330.  
  331.    _AltY : begin
  332.              for i := stV to (VorZeilen - VorCmdZeilen)-1 do
  333.                    VorWrite[Kanal]^[i] := VorWrite[Kanal]^[i+1];
  334.              VorWrite[Kanal]^[VorZeilen - VorCmdZeilen] := '';
  335.              X1V := 1;
  336.            end;
  337.  
  338.     _Del : if (XLV > 0) and (X1V <= XLV) then
  339.            begin
  340.              delete(VorWrite[Kanal]^[stV],X1V,1);
  341.              NeuPage := false;
  342.            end else
  343.            begin
  344.              if (X1V > XLV) and (X1V < 79) and (
  345.                 stV < (VorZeilen - VorCmdZeilen)) then
  346.              begin
  347.                i1 := 79 - X1V;
  348.                Hstr := copy(VorWrite[Kanal]^[stV+1],1,i1);
  349.                VorWrite[Kanal]^[stV] := VorWrite[Kanal]^[stV] + Hstr;
  350.                delete(VorWrite[Kanal]^[stV+1],1,i1);
  351.                if VorWrite[Kanal]^[stV+1] = '' then
  352.                begin
  353.                  for i := stV+1 to (VorZeilen - VorCmdZeilen)-1 do
  354.                     VorWrite[Kanal]^[i] := VorWrite[Kanal]^[i+1];
  355.                  VorWrite[Kanal]^[VorZeilen - VorCmdZeilen] := '';
  356.                end;
  357.              end else Alarm;
  358.            end;
  359.  
  360.      _Up : begin    (* Cursor Up *)
  361.              dec(stV); dec(Y1V);
  362.              if Y1V < 1 then Y1V := 1;
  363.              Set_st_Szeile(Kanal,1,1);
  364.              if stV < 1 then
  365.              begin
  366.                stV := 1;
  367.                Alarm;
  368.              end;
  369.              if length(VorWrite[Kanal]^[stV]) < X1V then X1V := length(VorWrite[Kanal]^[stV]) + 1;
  370.            end;
  371.  
  372.      _Dn : begin    (* Cursor Dn *)
  373.              Set_st_Szeile(Kanal,1,1);
  374.              inc(stV); inc(Y1V);
  375.              if Y1V > VAnz then Y1V := VAnz;
  376.              if stV > (VorZeilen - VorCmdZeilen) then
  377.              begin
  378.                stV := VorZeilen - VorCmdZeilen;
  379.                if VorWrite[Kanal]^[stV] > '' then Vor_Feld_Scroll(Kanal)
  380.                                              else Alarm;
  381.              end;
  382.              if length(VorWrite[Kanal]^[stV]) < X1V then X1V := length(VorWrite[Kanal]^[stV]) + 1;
  383.            end;
  384.  
  385.    _Left : begin  (* Cursor left *)
  386.              if X1V > 1 then dec(X1V) else Alarm;
  387.              NeuPage := false;
  388.            end;
  389.  
  390.   _Right : begin   (* Cursor right *)
  391.              if X1V <= XLV then inc(X1V) else Alarm;
  392.              NeuPage := false;
  393.            end;
  394.  
  395.    _Home : begin         (* Home *)
  396.              X1V := 1;
  397.              NeuPage := false;
  398.            end;
  399.  
  400.     _Ins : begin         (* Ins *)
  401.              Insert_ON := not Insert_ON;
  402.              NeuPage := false;
  403.            end;
  404.  
  405.     _End : begin         (* END *)
  406.              X1V := XLV + 1;
  407.              NeuPage := false;
  408.            end;
  409.  
  410.     _Tab : begin
  411.              Flag := false;
  412.              if (stV > 1) and TabFill then Hstr := VorWrite[Kanal]^[stV-1]
  413.                                       else Hstr := '';
  414.              if Hstr > '' then
  415.              begin
  416.                if X1V <= length(Hstr) then
  417.                begin
  418.                  delete(Hstr,1,X1V);
  419.                  Hstr := ConstStr('#',X1V) + Hstr;
  420.                  if pos(B1,Hstr) in [X1V..78] then
  421.                  begin
  422.                    i := pos(B1,Hstr);
  423.                    While (Hstr[i] = B1) and (i < length(Hstr)) do inc(i);
  424.                    if XLV + (i - X1V) > 78 then i := Byte(78 - XLV) + X1V;
  425.                    if i - X1V = 0 then Alarm;
  426.                    Insert(ConstStr(B1,i-X1V),VorWrite[Kanal]^[stV],X1V);
  427.                    X1V := i;
  428.                  end else Flag := true;
  429.                end else Flag := true;
  430.              end else Flag := true;
  431.              if Flag then
  432.              begin
  433.                i := length(G^.TabStr);
  434.                if (XLV + i) > 78 then i := Byte(78 - XLV);
  435.                if i = 0 then Alarm;
  436.                Insert(copy(G^.TabStr,1,i),VorWrite[Kanal]^[stV],X1V);
  437.                X1V := X1V + i;
  438.              end;
  439.            end;
  440.  
  441. _CtrlLeft,
  442. _CtrlRight:begin
  443.              Cur_Wort(VorWrite[Kanal]^[stV],KC,X1V,1);
  444.              NeuPage := false;
  445.            end;
  446.  
  447. _CtrlPgUp: begin   (* Ctrl-Page-Up *)
  448.              Set_st_Szeile(Kanal,1,1);
  449.              stV := 1; X1V := 1; Y1V := 1;
  450.            end;
  451.  
  452. _CtrlPgDn: begin    (* Ctrl-Page-Dn *)
  453.              Set_st_Szeile(Kanal,1,1);
  454.              i := (VorZeilen - VorCmdZeilen);
  455.              While (VorWrite[Kanal]^[i] = '') and (i > 1) do dec(i);
  456.              stV := i;
  457.              if i < VAnz then Y1V := stV else Y1V := VAnz;
  458.              X1V := length(VorWrite[Kanal]^[stV]) + 1;
  459.            end;
  460.  
  461.     _Esc : begin
  462.              Cmd := true;
  463.              X1C := length(VorWrite[Kanal]^[stC]) + 1;
  464.            end;
  465.  
  466.     _Nix :;
  467.  
  468.       else Alarm;
  469.  
  470.     end;  { case KC of }
  471.  
  472.     if show = Kanal then if NeuPage
  473.      then Neu_BildVor(Kanal)
  474.      else WritePage(Kanal,1,Y1V+Vofs,Attrib[24],0,VorWrite[Kanal]^[stV] + G^.Leer);
  475.  
  476.     Soft_Cursor(Kanal);
  477.   end;
  478. End;
  479.  
  480. Procedure ChangeXYst (* Kanal,Art : Byte; Var X1,Y1,st : Byte *);
  481. Begin
  482.   with K[Kanal]^ do
  483.   begin
  484.     if Vor_im_EMS then EMS_Seite_einblenden(Kanal,Vor);
  485.     if Art = 0 then
  486.     begin
  487.       if Cmd then
  488.       begin
  489.         st := stC; X1 := X1C; Y1 := Y1C;
  490.       end else
  491.       begin
  492.         st := stV; X1 := X1V; Y1 := Y1V;
  493.       end;
  494.     end;
  495.  
  496.     if Art = 1 then
  497.     begin
  498.       if Cmd then
  499.       begin
  500.         stC := st; X1C := X1; Y1C := Y1;
  501.       end else
  502.       begin
  503.         stV := st; X1V := X1; Y1V := Y1;
  504.       end;
  505.     end;
  506.   end;
  507. End;
  508.  
  509. (* scrollt das Array für den Vorschreibschirm nach oben *)
  510. Procedure Vor_Feld_Scroll (* Kanal : Byte *);
  511. var   VAnz : Byte;
  512.       i    : Integer;
  513.  
  514. Begin
  515.   with K[Kanal]^ do
  516.   begin
  517.     if Vor_im_EMS then EMS_Seite_einblenden(Kanal,Vor);
  518.     VAnz := VEnd - VBeg + 1;
  519.     if Cmd then
  520.     begin
  521.       X1C := 3;
  522.       inc(stC); inc(Y1C);
  523.       if Y1C > VorCmdZeilen then Y1C := VorCmdzeilen;
  524.       if Y1C > VAnz then Y1C := VAnz;
  525.       if stC > VorZeilen then
  526.       begin
  527.         for i := VorZeilen-VorCmdZeilen+1  to VorZeilen - 1
  528.          do VorWrite[Kanal]^[i] := VorWrite[Kanal]^[i+1];
  529.         stC := VorZeilen;
  530.         VorWrite[Kanal]^[stC][0] := Chr(2);
  531.       end;
  532.     end else
  533.  
  534.     begin
  535.       X1V := 1;
  536.       inc(stV); inc(Y1V);
  537.       if Y1V > VAnz then Y1V := VAnz;
  538.       if (stV > (VorZeilen - VorCmdZeilen)) and (Y1V = VAnz) then
  539.       begin
  540.         for i := 1 to VorZeilen - VorCmdZeilen - 1 do
  541.         begin
  542.           VorWrite[Kanal]^[i] := VorWrite[Kanal]^[i+1];
  543.           stTX[i] := stTX[i+1];
  544.         end;
  545.         stV := VorZeilen - VorCmdZeilen;
  546.         VorWrite[Kanal]^[stV] := '';
  547.         stTX[stV] := false;
  548.       end;
  549.     end;
  550.   end;
  551. End;
  552.  
  553. (* scrollt das Array für den Vorschreibschirm ab der Position 'st' nach unten *)
  554. Procedure Vor_Dn_Scroll (* Kanal : Byte *);
  555. Var  i,i1       : Integer;
  556.      X1,Y1,st   : Byte;
  557. Begin
  558.   with K[Kanal]^ do
  559.   begin
  560.     ChangeXYst(Kanal,0,X1,Y1,st);
  561.     i1 := VorZeilen - VorCmdZeilen;
  562.     if st < i1 then for i := 1 to i1 - st do
  563.        VorWrite[Kanal]^[i1-i+1] := VorWrite[Kanal]^[i1-i];
  564.     ChangeXYst(Kanal,1,X1,Y1,st);
  565.   end;
  566. End;
  567.  
  568. Procedure Neu_BildVor (* Kanal : Byte *);
  569. Var  st,X1,Y1,i,i1,
  570.      VAnz,Attr,AMerk  : Byte;
  571. Begin
  572.   with K[Kanal]^ do
  573.   begin
  574.     ChangeXYst(Kanal,0,X1,Y1,st);
  575.     VAnz := VEnd - VBeg + 1;
  576.     if Cmd then
  577.     begin
  578.       Attr := Attrib[23];
  579.       if VAnz > VorCmdZeilen then
  580.       begin
  581.         VAnz := VorCmdZeilen;
  582.         Teil_Bild_Loesch(VBeg+VAnz,VEnd,Attr);
  583.       end;
  584.     end else Attr := Attrib[24];
  585.     i1 := st - Y1;
  586.     for i := 1 to VAnz do
  587.     begin
  588.       AMerk := Attr;
  589.       if stTX[i1+i] then Attr := Attrib[6];
  590.       WritePage(Kanal,1,i+Vofs,Attr,0,VorWrite[Kanal]^[i1+i] + G^.Leer);
  591.       Attr := AMerk;
  592.     end;
  593.   end;
  594. End;
  595.  
  596. Procedure Soft_Cursor (* Kanal : Byte *);
  597. Var   X1,Y1,st,
  598.       Xh,Attr  : Byte;
  599.       Neben    : Boolean;
  600. Begin
  601.   with K[Kanal]^ do
  602.   begin
  603.     ChangeXYst(Kanal,0,X1,Y1,st);
  604.     if not HardCur then
  605.     begin
  606.       Neben := false;
  607.       Xh := X1;
  608.       if Xh > 80 then Xh := 80;
  609.       if Xh > length(VorWrite[Kanal]^[st]) then Neben := true;
  610.       if Neben then Attr := Attrib[21] else Attr := Attrib[22];
  611.       if not Insert_ON then Attr := Byte(Attr + 128);
  612.       if Neben then WritePage(Kanal,Xh,Y1+Vofs,Attr,0,'█')
  613.                else WriteAttr(Xh,Y1+Vofs,1,Attr,1);
  614.     end else InitCursor(X1,Y1+Vofs);
  615.   end;
  616. End;
  617.  
  618.  
  619. Procedure Set_st_Szeile (* Kanal,Art,st : Byte *);
  620. var  i : Byte;
  621. Begin
  622.   with K[Kanal]^ do
  623.   begin
  624.     if Vor_im_EMS then EMS_Seite_einblenden(Kanal,Vor);
  625.     if Art = 0 then
  626.     begin
  627.       stTX[st] := true;
  628.       Einer_st := true;
  629.       TxByte := TxByte + length(VorWrite[Kanal]^[st]) + 1;
  630.     end else if Art = 1 then
  631.     begin
  632.       for i := 1 to VorZeilen do stTX[i] := false;
  633.       Einer_st := false;
  634.       TxByte := 0;
  635.     end;
  636.   end;
  637. End;
  638.  
  639.  
  640. Procedure TX_Out (* Kanal : Byte; All : Boolean *);
  641. Var  i    : Byte;
  642.      Hstr : String[80];
  643. Begin
  644.   with K[Kanal]^ do
  645.   Begin
  646.     Hstr := '';
  647.     Auto_CON := false;
  648.     if Kanal = 0 then K[0]^.TncNummer := Unproto;
  649.  
  650.     if Vor_im_EMS then EMS_Seite_einblenden(Kanal,Vor);
  651.  
  652.     if Conv.Active and (Kanal = ConvHilfsPort) then Conv_Tx_All(Kanal) else
  653.     begin
  654.       EigFlag := Echo in [1,3,5,7];
  655.       for i := 1 to VorZeilen - VorCmdZeilen do if stTX[i] then
  656.       begin
  657.         Hstr := Line_convert(Kanal,1,VorWrite[Kanal]^[i]);
  658.         if Kanal > 0 then NodeConnect(Kanal,UpCaseStr(Hstr));
  659.         S_PAC(Kanal,NU,false,Hstr + M1);
  660.       end;
  661.       if All then S_PAC(Kanal,NU,true,'');
  662.       EigFlag := false;
  663.     end;
  664.  
  665.     Set_st_Szeile(Kanal,1,1);
  666.   End;
  667. End;  (* TX_out *)
  668.  
  669.  
  670. Procedure Del_Wort (* Var Zeile : Str80; X1 : Byte *);
  671. Begin
  672.   if Zeile[X1] in Menge then delete(Zeile,X1,1) else
  673.   begin
  674.     Repeat
  675.       delete(Zeile,X1,1);
  676.     Until (X1 > length(Zeile)) or (Zeile[X1] in Menge);
  677.   end;
  678.   While (Zeile[X1] = B1) and (X1 <= length(Zeile)) do delete(Zeile,X1,1);
  679. End;
  680.  
  681. Procedure Cur_Wort (* Zeile : Str80; KC : Sondertaste; Var X1 : Byte; XM : Byte *);
  682. Var  XLV : Byte;
  683. Begin
  684.   if KC = _CtrlLeft then
  685.   begin
  686.     if X1 > XM then
  687.     begin
  688.       Repeat
  689.         dec(X1);
  690.       Until (X1 < XM ) or (not(Zeile[X1] in Menge));
  691.       While (X1 >= XM) and (not(Zeile[X1] in Menge)) do dec(X1);
  692.       inc(X1);
  693.     end else Alarm;
  694.   end else if KC = _CtrlRight then
  695.   begin
  696.     XLV := length(Zeile);
  697.     if X1 <= XLV then
  698.     begin
  699.       While (X1 <= XLV) and (not(Zeile[X1] in Menge)) do inc(X1);
  700.       While (X1 <= XLV) and (Zeile[X1] in Menge) do inc(X1);
  701.     end else Alarm;
  702.   end;
  703. End;
  704.